import echarts from "echarts";
let option = {
  // backgroundColor: "#000",
  title: {
    text: "实时同步速率",
    left: "center",
    // top: "5%",
    textStyle: {
      // color: "#fff",
      fontWeight: "normal",
      fontSize: 16
    }
  },
  series: [
    {
      name: "统计",
      type: "gauge",
      radius: "65%", // 图表尺寸
      center: ["50%", "55%"],
      min: 0,
      max: 5000,
      splitNumber: 5,
      // startAngle: 210,
      // endAngle: -30,
      axisLine: {
        show: true,
        lineStyle: {
          width: 0,
          shadowBlur: 0,
          // color: [
          //   [0.05, "#a62efb"],
          //   [0.1, "#af23fa"],
          //   [0.15, "#b31ffa"],
          //   [0.2, "#b71afa"],
          //   [0.25, "#b51dfa"],
          //   [0.3, "#b220fa"],
          //   [0.35, "#a42ffb"],
          //   [0.4, "#993dfb"],
          //   [0.45, "#8f47fb"],
          //   [0.5, "#7b5efc"],
          //   [0.55, "#6476fc"],
          //   [0.6, "#4c91fd"],
          //   [0.65, "#35abfe"],
          //   [0.7, "#24befe"],
          //   [0.75, "#12d1ff"],
          //   [0.8, "#06defe"],
          //   [0.85, "#05e0ff"],
          //   [0.9, "#06deff"],
          //   [0.95, "#06deff"],
          //   [1, "#06deff"]
          // ]
          color: [
            [
              1,
              new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                {
                  offset: 0,
                  color: "#6FD1FF"
                },
                {
                  offset: 0.5,
                  color: "#2A97FF"
                },
                {
                  offset: 1,
                  color: "#915BFF"
                }
              ])
            ],
            [1, "#173991"]
          ]
        }
      },
      axisTick: {
        show: true,
        lineStyle: {
          color: "auto",
          width: 0.5
        },
        length: -5,
        splitNumber: 5
      },
      splitLine: {
        show: true,
        length: 5,
        lineStyle: {
          color: "auto",
          width: 1
        }
      },
      axisLabel: {
        distance: -5,
        color: '#999',
        fontSize: 1
      },
      pointer: {
        // 仪表盘指针
        show: true
      },
      detail: {
        show: true,
        offsetCenter: [0, "100%"], // x, y，单位px
        textStyle: {
          // 其余属性默认使用全局文本样式，详见TEXTSTYLE
          color: "#3DABFF",
          fontSize: 18,
          fontWeight: 900
        },
        formatter: "{value}"
      },
      title: {
        show: true,
        offsetCenter: [0, "40%"], // x, y，单位px
        textStyle: {
          color: "#B8DFFF",
          fontSize: 16
        }
      },
      data: [
        {
          //   name: "使用率",
            value: 999,
            name:'条/秒',
            title: {
              offsetCenter: ['-50%', '80%']
          },
          detail: {
              offsetCenter: ['-40%', '30%']
          }
          }

      ]
    },
    {
      type: "gauge",
      radius: "76%",
      center: ["50%", "55%"],
      splitNumber: 6, //刻度数量
      // startAngle: 215,
      // endAngle: -35,
      axisLine: {
        show: true,
        lineStyle: {
          width: 6,
          color: [
            [
              1,
              new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                {
                  offset: 0,
                  color: "#6FD1FF"
                },
                {
                  offset: 0.5,
                  color: "#2A97FF"
                },
                {
                  offset: 1,
                  color: "#915BFF"
                }
              ])
            ],
            [1, "#173991"]
          ]
        }
      },
      // 分隔线样式。
      splitLine: {
        show: false
      },
      axisLabel: {
        show: false
      },
      axisTick: {
        show: false
      },
      pointer: {
        show: false
      },
      title: {
        show: false,
        offsetCenter: [0, "-30%"], // x, y，单位px
        textStyle: {
          color: "#fff",
          fontSize: 20
        }
      },
      // 仪表盘详情，用于显示数据。
      detail: {
        show: false,
        offsetCenter: [0, "16%"],
        color: "#fff",
        formatter: function (params) {
          return params + "%";
        },
        textStyle: {
          fontSize: 42
        }
      },
      data: [
        // {
        //   name: "正常率",
        //   value: 90.61
        // }
      ]
    }
  ]
};

export default option;
